<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/5/27
 * Time: 11:42
 */

namespace api;

use think\Db;
use tools\Server;

class User extends Server
{

    public function get()
    {
        return __METHOD__;
    }

    public function add()
    {
        return __METHOD__ . 'SUCCESS';
    }

    public function update($params = [])
    {
//        return __METHOD__;

        if ($this->checkSign($params) == false) {
            return $this->response([
                'status' => '',
                'code' => '',
                'msg' => '',
                'data' => '',
            ]);
        }

        $flag = Db::name('user')->update([]);

        if ($flag) {
            return $this->response([
                'status' => '',
                'code' => '',
                'msg' => '',
                'data' => '',
            ]);
        } else {
            return $this->response([
                'status' => '',
                'code' => '',
                'msg' => '',
                'data' => '',
            ]);
        }
    }

    public function delete()
    {
        return __METHOD__;
    }

}